package string; 

	class Utils  {
		
		
		
		public function new() {
			
		}
		
		public static function get_colour( col:String ) : Float
		{
			if( col.substr(0,2) == '0x' )
				return Std.parseFloat(col);
				
			if( col.substr(0,1) == '#' )
				return Std.parseFloat('0x'+ col.substr(1,col.length));
				
			if( col.length==6 )
				return Std.parseFloat( '0x'+col );
				
			// not recognised as a valid colour, so?
			return Std.parseFloat( col );
				
		}
		
	}
	
